package edu.cmu.aes.project2;

import java.rmi.RemoteException;

import org.bpel.sample.bpel.sample.PlaceorderProxy;
import org.bpel.sample.bpel.sample.Placeorder_PortType;

public class PlaceOrder {
	public java.lang.String process(java.lang.String customername, int amount, java.util.Calendar date, org.bpel.sample.bpel.sample.PlaceorderRequestOrder order){
		
		Placeorder_PortType placeOrderService = new PlaceorderProxy();
		try{
			return placeOrderService.process(customername, amount, date, order);
		}catch(RemoteException e){
			e.printStackTrace();
			return "Cannot connect to server";
		}catch(Exception e){
			return "Unexcepted error";
		}
		
	}
}
